const P = new Function()
P.prototype = {
    total:0,
    records: null, 
    setRecords: function (records) {
        this.records = records
        return this
    },
    setTotal: function (total) {
        this.total = total
        return this
    },
}
const page = (records, total) => {
    return new P().setRecords(records).setTotal(total)
}

module.exports = {
    page
}